/**
 * 增加选项卡
 */
function addTab( pageId, pageName, pageUrl ){
	var tabOpt = {
	    id : pageId,
	    name : pageName,
	    url : pageUrl,
	    closeable : true,
	    afterClose : function(id){
	    	_parent()._ITC.deleteTab(id);
	    	_parent()._ITC.navTab.activeById("nav2");
	    }
	};
	var mappingOpt = {
	    url : pageUrl  
	};
	_parent()._ITC.addTab(tabOpt,mappingOpt);
	//这里要注意，_ITC提供的只是回调函数，手动触发选项卡切换还是要调用navTab的activeById
	//_parent()._ITC.navTab.insert(tabOpt,{"position":"last"});
	_parent()._ITC.navTab.activeById( pageId );
}

//关闭Tab by huangliwei
function closeTab(){
	var currentTabId=_parent().$("#itcui_nav_tab_container").find(".itcui-navigation-item-selected").attr("id").replace("itcui_nav_tab_","");
	_parent()._ITC.navTab.removeById(currentTabId);
}
